import { createI18n } from "vue-i18n";
import { getStorage, getBrowserLang } from "@/utils/index";
import zhCn from './lang/zh-cn.json'
import en from './lang/en.json'
const lang = getStorage("lang");
console.log("lang",lang)
const messages = {
  en: {
    ...en,
  },
  "zh-CN": {
    ...zhCn,
  },
};

const i18n = createI18n({
  legacy: false,
  locale: lang,
  fallbackLocale: "en", // 设置备用语言
  messages,
  specialCharacters: {
    "@": "@",
  },
});

export default i18n;
